import React, { Component } from 'react';
import './SearchInput.css'
import { useHistory} from 'react-router-dom'
import imgSearch from '../../assets/images/搜索.png'

const SearchInput = (props) => {
   
    const history = useHistory()
    const gotoSearch = () => {
        // console.log(history,'history')
        history.push('/search')
       
    }
    return (
        <div className="search" >
            <div className="search-input">
                <div className="search-place">
                   
                    
                    
                        <img className='search-img' src={imgSearch}></img>
                    
                    <input type="text" placeholder='光的方向' onFocus={gotoSearch}/> 
                </div>
            </div>
            
        </div>
    )
}

export default SearchInput